home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 25 / Cream of the Crop 25.iso / bbs / con_005c.zip / CONCORD.RAR / SCRIPT.RAR / NEWUSER.SCR < prev    next >
Text File  |  1997-04-25  |  6KB  |  222 lines

  1. ; NEWUSER.SCR : New user script
  2. ;
  3. ; This script is run in logon when a new user calls to the BBS.
  4. ;
  5. ; This script calls USERFORM.SCR script for ANSI users
  6. ; instead of asking for certain user information itself.
  7. ;
  8. ; Unremark GOSUB lines in the end of this script
  9. ; to set default combined message areas and last read pointers.
  10.  
  11. :BEGIN
  12.         write "^C12,0;Third degree interrogation begins...^M;^M;"
  13.  
  14.         menutype 7 language
  15.  
  16.         set @HOTKEYS@ = 1
  17.  
  18.         gosub ASK_COLORS
  19.         gosub ASK_TERMEMUL
  20.         menutype 7 charset
  21.         gosub ASK_SEX
  22.         gosub ASK_DATEFMT
  23.  
  24.         if @IEMSI_FOUND@ <> 1
  25.           gosub ASK_CITY
  26.           if @EMULATION@ = 4
  27.             gosub ASK_ALIAS
  28.           end
  29.         end
  30.  
  31.         if @EMULATION@ = 4
  32.           gosub ASK_ADDRESS
  33.         else
  34.           call USERFORM
  35.         end
  36.  
  37.         if @IEMSI_FOUND@ <> 1
  38.           if @EMULATION@ = 4
  39.             gosub ASK_HOMEPHONE
  40.             gosub ASK_DATAPHONE
  41.             gosub ASK_BIRTHDAY
  42.             gosub ASK_SCRLEN
  43.           end
  44.         end
  45.  
  46.         gosub ASK_PASSWORD
  47.  
  48.         goto END
  49.  
  50. :ASK_DATEFMT
  51.         write "^C15,0;Select date format :^M;"
  52.         write "^C14,0;1 ^C7,0;-^C14,0; MM-DD-YY^M;"
  53.         write "^C14,0;2 ^C7,0;-^C14,0; DD.MM.YY^M;"
  54.         write "^C15,0;Make your selection (~11,~22) [1] : ^W;^M;"
  55.         if @ANSWER@ = 2
  56.           set @DATEFORMAT@ = 21
  57.         else
  58.           set @DATEFORMAT@ = 0
  59.         end
  60.         return
  61.  
  62. :ASK_COLORS
  63.         write "^C15,0;Do you have colors? (~1Y/~2n) "
  64.         set @COLORS@ = @ANSWER@
  65.         if @ANSWER@ = 1
  66.           write "Yeah!^M;"
  67.         else
  68.           write "Nah...^M;"
  69.         end
  70.         return
  71.  
  72. :ASK_TERMEMUL
  73.         if @EMULATION@ <> 0
  74.           write "^C15,0;Use (~11) ANSI or (~22) Avatar emulation? "
  75.           set @EMULATION@ = @ANSWER@
  76.           if @ANSWER@ = 1
  77.             write "ANSI^M;"
  78.           else
  79.             write "Avatar^M;"
  80.           end
  81.         end
  82.         return
  83.  
  84. :ASK_ALIAS
  85.         set @ALIAS@ =
  86.         write "^C15,0;Alias? ^C14,1;^L35;^C15,0;^M;"
  87.         set @ALIAS@ = @ANSWER@
  88.         if @ANSWER@ = ""
  89.           write "^C15,0;Are you sure you don't want to have an alias? (~1Y/~2n) ^W;^M;"
  90.           if @ANSWER@ = 2
  91.             goto ASK_ALIAS
  92.           end
  93.         else
  94.           if @ALIAS@ = ""
  95.             write "^C15,0;Sorry, this alias is already reserved. Please select another.^M;"
  96.             goto ASK_ALIAS
  97.           end
  98.         end
  99.         return
  100.  
  101. :ASK_CITY
  102.         write "^C15,0;City or BBS name? ^C14,1;^L25;^C15,0;^M;"
  103.         if @ANSWER@ = ""
  104.           goto ASK_CITY
  105.         else
  106.           set @CITY@ = @ANSWER@
  107.         end
  108.         return
  109.  
  110. :ASK_ADDRESS
  111.         write "^C15,0;Home address (3 lines) :^M;"
  112.         write "^C15,0;1: ^C14,1;^L20;^C15,0;^M;"
  113.         if @ANSWER@ = ""
  114.           goto ASK_ADDRESS
  115.         else
  116.           set @ADDRESS1@ = @ANSWER@
  117.         end
  118.         write "^C15,0;2: ^C14,1;^L20;^C15,0;^M;"
  119.         set @ADDRESS2@ = @ANSWER@
  120.         write "^C15,0;2: ^C14,1;^L20;^C15,0;^M;"
  121.         set @ADDRESS3@ = @ANSWER@
  122.         return
  123.  
  124. :ASK_HOMEPHONE
  125.         ; write "^C15,0;Home phone number? ^C14,1;^L20;^C15,0;^M;"
  126.         write "^C15,0;Home phone number? ^C14,1;^L20,(###)###-####;^C15,0;^M;"
  127.         if @ANSWER@ = ""
  128.           goto ASK_HOMEPHONE
  129.         else
  130.           set @VOICE@ = @ANSWER@
  131.         end
  132.         return
  133.  
  134. :ASK_DATAPHONE
  135.         ; write "^C15,0;Data phone number? ^C14,1;^L20;^C15,0;^M;"
  136.         write "^C15,0;Data phone number? ^C14,1;^L20,(###)###-####;^C15,0;^M;"
  137.         set @DATA@ = @ANSWER@
  138.         return
  139.  
  140. :ASK_BIRTHDAY
  141.         var %BDAYTEMP% = DATE
  142.         ; write "^C15,0;Birthday? (@CURRDATEFMT@) ^C14,1;^L8;^C15,0;^M;"
  143.         write "^C15,0;Birthday? (@CURRDATEFMT@) ^C14,1;^L8,##-##-##;^C15,0;^M;"
  144.         set %BDAYTEMP% = @ANSWER@
  145.         if %BDAYTEMP% = ""
  146.           goto ASK_BIRTHDAY
  147.         end
  148.         set @BIRTHDAY@ = @ANSWER@
  149.         if ((@AGE@ < 7) or (@AGE@ > 80))
  150.           goto ASK_BIRTHDAY
  151.         end
  152.         return
  153.  
  154. :ASK_SEX
  155.         write "^C15,0;Male or Female? (~1M/~2f) "
  156.         if @ANSWER@ = 2
  157.           write "Female^M;"
  158.           set @FEMALE@ = TRUE
  159.         else
  160.           write "Male^M;"
  161.           set @FEMALE@ = FALSE
  162.         end
  163.         return
  164.  
  165. :ASK_SCRLEN
  166.         set @DEFAULT_ANSWER@ = 24
  167.         write "^C15,0;Your screen length? ^C14,1;^L2;^C15,0;^M;"
  168.         if ((@ANSWER@ < 20) or (@ANSWER@ > 100))
  169.           write "^C15,0;Sorry, only values between 20 and 100 are allowed.^M;"
  170.           goto ASK_SCRLEN
  171.         else
  172.           set @SCREENLEN@ = @ANSWER@
  173.           return
  174.         end
  175.  
  176. :ASK_PASSWORD
  177.         var %PASSTEMP% = STRING 15
  178.         write "^C15,0;Password?   ^C14,1;^L15,HIDDEN;^C15,0;^M;"
  179.         if @ANSWER@ = ""
  180.           goto ASK_PASSWORD
  181.         end
  182.         set %PASSTEMP% = @ANSWER@
  183.         write "^C15,0;Once again: ^C14,1;^L15,HIDDEN;^C15,0;^M;"
  184.         if "%PASSTEMP%" = "@ANSWER@"
  185.           set @PASSWORD@ = @ANSWER@
  186.           return
  187.         else
  188.           write "^C12,0;WRONG! Try again...^M;"
  189.           goto ASK_PASSWORD
  190.         end
  191.  
  192. :SET_AREAS
  193.         ; See SET MSG AREAS menutype documents for correct parameters.
  194.         ;
  195.         ; "ALL OFF" will turn off all message areas.
  196.         ;
  197.         write "^C7,0;■ ^C15,0;Clearing default combined message areas^M;"
  198.         menutype 200f ALL OFF
  199.         return
  200.  
  201. :SET_POINTERS
  202.         ; See SET LAST READ PTR menutype documents for correct parameters.
  203.         ;
  204.         ; "ALL MAX" will set pointers to the end of the messages.
  205.         ;
  206.         write "^C7,0;■ ^C15,0;Setting last read pointers to end of messages^M;"
  207.         menutype 200f ALL MAX
  208.         return
  209.  
  210. :END
  211.         write "^C12,0;Thank you very much for completing this questionnaire.^M;"
  212.         write "^C12,0;You should now check your settings from Setup menu,^M;"
  213.         write "^C12,0;after which you are free to go.^M;^M;"
  214.         ;
  215.         ; Remove semicolon from the beginning of next GOSUB lines
  216.         ; to set default combined message areas and last read pointers :
  217.         ;
  218.         ; gosub SET_AREAS
  219.         ; gosub SET_POINTERS
  220.         ;
  221.         QUIT
  222.